Bile acids are steroid acids which are found in the bile of mammals and include compounds such as cholic acid, chenodeoxycholic acid, lithocholic acid and deoxycholic acid, all of which are found in humans. Many bile acids are natural ligands of the farnesoid X receptor (FXR) which is expressed in the liver and intestine of mammals, including humans.
Bile acids are derivatives of steroids and are numbered in the same way. The following shows the general numbering system for steroids and the numbering of the carbon atoms in chenodeoxycholic acid.

Agonists of FXR have been found to be of use in the treatment of cholestatic liver disorders including primary biliary cholangitis and non-alcoholic steatohepatitis (see review by Jonker et al., in Journal of Steroid Biochemistry & Molecular Biology, 2012, 130, 147-158; incorporated herein by reference).
Ursodeoxycholic acid (UDCA), a bile acid originally isolated from the gall bladder of bears, is currently used in the treatment of cholestatic liver disorders, although it appears to be inactive at the FXR.
As well as their action at the FXR, bile acids and their derivatives are also modulators of the G protein-coupled receptor TGR5. This is a member of the rhodopsin-like superfamily of G-protein coupled receptors and has an important role in the bile acid signalling network, which complements the role of the FXR.
Because of the importance of FXR and TGR5 agonists in the treatment of cholestatic liver disorders, efforts have been made to develop new compounds which have agonist activity at these receptors. One particularly active compound is obeticholic acid, which is a potent agonist of both FXR and TGR5. Obeticholic acid is described in WO02/072598 and EP1568706 (both incorporated herein by reference), both of which describe a process for the preparation of obeticholic acid from 7-keto lithocholic acid, which is derived from cholic acid. Further processes for the production of obeticholic acid and its derivatives are described in WO2006/122977, US2009/0062256 and WO2013/192097 (all incorporated herein by reference) and all of these processes also start from 7-keto lithocholic acid.
It is clear from the number of patent publications directed to processes for the production of obeticholic acid that it is by no means simple to synthesise this compound and indeed the process which is currently used starts from cholic acid, has 12 steps and a low overall yield.
In addition to the inefficiency and high cost of this process, there are also problems with the cost and availability of the starting materials. Cholic acid, the current starting material for the production of obeticholic acid, is a natural bile acid which is usually obtained from the slaughter of cows and other animals. This means that the availability of cholic acid and other bile acids is limited by the number of cattle available for slaughter. Since the incidence of cholestatic liver disease is increasing worldwide, the demand for synthetic bile acids such as obeticholic acid is also likely to increase and it is doubtful whether the supply of naturally derived bile acids will continue to be sufficient to meet demand.
Furthermore, the use of a starting material derived from animals means that there is the possibility of the contamination of the material with infectious agents such as viruses or prions, which can not only be hazardous to workers but could potentially contaminate the end products if steps are not taken to prevent this.
Although some patients with cholestatic liver disease can be treated with ursodeoxycholic acid, this is also a natural bile acid and faces the same problems of limited availability and high cost.
In an attempt to solve the problems associated with the use of bile acids as starting materials, the present inventors have devised a process for the synthesis of synthetic bile acid derivatives, such as obeticholic acid (OCA, referred to herein as compound (XVIIIA)), which uses plant sterols as starting materials.

The inventors have developed a process for the production of synthetic bile acids which proceeds via novel intermediates and which provides the final product in significantly higher yield than current processes. The process is flexible and can use a variety of different starting materials including animal, fungal and plant sterols.
Suitable animal sterols which can be used as starting materials include deoxycholic acid, cholic acid, while fungal sterols include ergosterol.
Plant sterols are widely available at significantly lower cost than bile acids and, indeed, are often waste products of other processes. Suitable plant sterol and plant sterol derivatives which can be used as starting materials include 3-keto-bis-norcholenol (also known as 20-hydroxymethylpregn-4-en-3-one), androstenedione, androstadienedione, dehydroepiandrosterone, stigmasterol, brassicasterol, campesterol and R-sitosterol.
Our patent applications Nos. PCT/GB2015/053516 (WO2016/079517), PCT/GB2015/053517 (WO2016/079518), PCT/GB2015/053518 (WO2016/079519) and PCT/GB2015/053519 (WO2016/079520) (all incorporated herein by reference) relate to intermediates in the process of synthesizing obeticholic acid (and analogues) as well as to processes for preparing the intermediates and processes for converting them to the desired products.